 <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>团队管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <include file="Index/common_css"/>
    <link href="__PUBLIC__/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!-- Data Tables -->
    <link href="__PUBLIC__/admin/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <style>
        .download{float:right;}
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>团队管理</h5>
                        <a class="download" href="__URL__/downloadGroup/id/{$id}/type/{$type}/from/{$from}/to/{$to}"><i class="fa fa-download"></i>下载>></a>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <form method="post" action="__URL__/index" id="searchForm">
                                <div class="col-sm-2 m-b-xs">
                                    <select class="input-sm form-control input-s-sm inline" name="type">
                                        <option value="1" <if condition="$type eq 1">selected</if>>个人</option>
                                        <option value="2" <if condition="$type eq 2">selected</if>>团队</option>
                                    </select>
                                </div>
                                <div class="col-sm-4 m-b-xs">
                                    时间 ： <input type="text" id="from" value="{$from}" name="from" class="laydate-icon form-control layer-date" style="width:40%;display:inline-block;"> -
                                    <input type="text" id="to" value="{$to}" name="to" class="laydate-icon form-control layer-date" style="width:40%;display:inline-block;">
                                </div>
                                <div class="col-sm-4">
                                    <div class="input-group">
                                        <input type="text" placeholder="请输入MT4账号" value="{$id}" class="input-sm form-control" name="id" datatype="*" nullmsg="null" errormsg="&#xe706;" sucmsg=" ">
                                        <span class="input-group-btn"><button type="submit" class="btn btn-sm btn-primary" id="btn-search">搜索</button></span>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover dataTables-example">
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th>ID (MT4账号)</th>
                                        <th>姓名</th>
                                        <th>职位</th>
                                        <th>邮箱</th>
                                        <th>电话</th>
                                        <th>注册时间</th>
                                        <th>杠杆</th>
                                        <th>短期交易量</th><!--短期-->
                                        <th>外汇交易量</th>
                                        <th>余额</th>
                                    </tr>
                                </thead>
                                <tbody class="list">
                                <volist name="list" id="vo">
                                    <tr>
                                        <td>
                                            <input type="checkbox" class="i-checks" name="input[]">
                                        </td>
                                        <td>{$vo.user_id}</td>
                                        <td>{$vo.user_name}</td>
                                        <td>{$vo.user_position}</td>
                                        <td>{$vo.user_email}</td>
                                        <td>{$vo.user_phone}</td>
                                        <td>{$vo.user_createtime}</td>
                                        <td>{$vo.level}</td>
                                        <td>{$vo.rapidly}</td>
                                        <td>{$vo.standard}</td>
                                        <td>{$vo.balance}</td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <include file="Index/common_js"/>
    <!-- 自定义js -->
    <script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>

    <!-- Data Tables -->
    <script src="__PUBLIC__/admin/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<!--时间插件-->
    <script src="__PUBLIC__/admin/js/plugins/layer/laydate/laydate.js"></script>
    <script>
        $(document).ready(function () {
            $('.dataTables-example').dataTable();
            laydate({
                elem: '#from', /*目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'*/
                event: 'focus', /*响应事件。如果没有传入event，则按照默认的click*/
                //format: 'YYYY-MM-DD hh:mm:ss',
            });
            laydate({
                elem: '#to', /*目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'*/
                event: 'focus' /*响应事件。如果没有传入event，则按照默认的click*/
            });
        });

        var index;
        $("#searchForm").Validform({
            btnSubmit:"#btn-search",
            //ajaxPost:true,
            tiptype: function(msg, o, cssctl) {
                //msg：提示信息;
                //o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
                //cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
                if (!o.obj.is("form")) { //验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
                    var objtip = o.obj.parent().siblings(".Validform_checktip");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                }
            },beforeSubmit:function(curform){
                index = layer.load();
            }/*,callback:function(data){
                layer.close(index);
                console.log(data);
                //alert(JSON.stringify(data));return;
                $('.list').html('');
                if(data.status==1){
                    for(var i=0;i<data.msg.length;i++){
                        var str='<tr>' +
                            '<td><input type="checkbox" class="i-checks" name="input[]"></td>' +
                            '<td>'+data.msg[i].user_id+'</td>' +
                            '<td>'+data.msg[i].user_name+'</td>' +
                            '<td>'+data.msg[i].user_position+'</td>' +
                            '<td>'+data.msg[i].user_email+'</td>' +
                            '<td>'+data.msg[i].user_phone+'</td>' +
                            '<td>'+data.msg[i].user_createtime+'</td>' +
                            '<td>'+data.msg[i].level+'</td>' +
                            '<td>'+data.msg[i].rapidly+'</td>' +
                            '<td>'+data.msg[i].standard+'</td>' +
                            '<td>'+data.msg[i].balance+'</td>' +
                        '</tr>';
                        $('.list').append(str);
                    }
                }else if(data.status==0){
                    layer.msg(data.msg,{icon: 2, time: 2000});
                }else{
                    layer.msg('网络错误',{icon: 2, time: 2000});
                }
            }*/
        });
    </script>
</body>
</html>
